import request from '@/utils/request'


export default {

    // 获取讲师列表
    getPageList(pageQuery) {

        return request({

            url: `/eduservice/edu-teacher/getPageList`,
            method: 'post',
            //pageQuery条件对象，后端使用RequestBody获取数据
            //data表示把对象转换json进行传递到接口里面
            data: pageQuery


        })
    },

    //删除
    deleteById(id) {

        return request({


            url: `/eduservice/edu-teacher/delete/${id}`,
            method: 'delete',


        })

    },

    //添加
    addTeacher(teacher) {
        return request({
            url: `/eduservice/edu-teacher/addTeacher`,
            method: "post",
            data: teacher
        })
    },


    //根据id查询
    getTeacherById(id) {

        return request({
            url: `/eduservice/edu-teacher/getTeacherById?id=${id}`,
            method: "get",



        })
    },

    //修改方法
    updateTeacher(teacher) {

        return request({

            url: `/eduservice/edu-teacher/updateTeacher`,
            method: "post",
            data: teacher
        })

    }



}
